<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
<title>Shortcut</title>
<style>@import url(coUA.css);</style>
<link disabled rel="stylesheet" href="htmlhelp.css">
</HEAD>

<BODY>
<h1>Shortcut command</h1>

<h2>Purpose</h2>

<p>Creates a shortcut to a specified action by passing Windows-based messages and parameters. For example, if a topic discusses a procedure that involves a specific dialog box, you can provide a link that a user can click in the topic to open the dialog box in the program.</p>

<p>This command can be used only with a compiled help (.chm) file.</p>


<h2>Syntax</h2>

<p><pre><code>
&lt;PARAM  name=&quot;Command&quot; value=&quot;ShortCut&quot;&gt;
<br>&lt;PARAM  name=&quot;Item1&quot;   value=&quot;,<!-- <i>window class, </i> removed because this feature seems to be broken right now. Also mentioned in the table below. --><i>program name</i>,<i>parameters</i>&quot;&gt;
<br>&lt;PARAM  name=&quot;Item2&quot;   value=&quot;<i>message ID</i>,<i>wPARAM</i>,<i>lPARAM</i>&quot;&gt;
<br>[&lt;PARAM name="Button"  value="[Text: <i>Button text</i>|Bitmap: <i>Bitmap file path</i>|Icon:<i>Icon file path</i>]"&gt;]
<br>[&lt;PARAM name="Font"    value="<i><i>Facename[, point size[, charset[, color[, PLAIN BOLD ITALIC UNDERLINE]]]]</i></i>"&gt;]
<br>[&lt;PARAM name="Text"    value="Text: <i>Link text</i>"&gt;]
<!--br>[&lt;PARAM name=&quot;Window&quot;  value=&quot;<i>File name or HTTP URL</i>&quot;&gt;]-->
</pre></code></p>

<br>
<table border=1 cellpadding=0 cellspacing=0 width=100%>
<tr valign=top>
<th width=25%>
<b>Property</b>
</th>
<th>
<b>Description</b>
</th>
</tr>

<tr valign=top>
<td>
<a href="ocx_pbutton.htm">Button</a>
</td>
<td>
Specifies the button style. Optional.
</td>
</tr>

<tr valign=top>
<td>
<a href="ocx_pcommand.htm">Command</a>
</td>
<td>
Calls the <b>Shortcut</b> command.
</td>
</tr>

<tr valign=top>
<td>
<a href="ocx_pfont.htm">Font</a>
</td>

<td>
Specifies the font attributes. Optional.
</td>
</tr>

<tr valign=top>
<td>
<a href="ocx_pitem.htm">Item1</a>
</td>
<td>
Specifies the <!--window class, the--> file path to the executable file (.exe) for the program, and any parameters to be sent to the program. These values are delimited by a comma.
<p>HTML Help does not support <code>%WINDIR%</code> or other system variables in the file path.</p>
</td>
</tr>

<!-- window class was removed because it seems to be broken. -->

<tr valign=top>
<td>
<a href="ocx_pitem.htm">Item2</a>
</td>
<td>
Specifies the message ID of a standard Windows message, a <i>wPARAM</i> value, and a <i>lPARAM</i> value. These values are delimited by a comma.
</td>
</tr>

<tr valign=top>
<td>
<a href="ocx_ptext.htm">Text</a>
</td>

<td>
Specifies the link text. Optional.
</td>
</tr>

<!--tr valign=top>
<td>
<a href="ocx_pwindow.htm">Window</a>
</td>
<td>
Specifies an HTML file name or an HTTP URL to navigate to if the specified program cannot be found. Optional.
</td>
</tr-->
</table>


<h2>Example</h2>
<p><pre><code>
&lt;OBJECT
<br>  id=shortcut
<br>  type="application/x-oleobject"
<br>  classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
<br>  codebase="hhctrl.ocx#Version=4,72,8252,0"
<br>  width=100
<br>  height=100
<br>&gt;
<br>  &lt;PARAM name="Command" value="ShortCut"&gt;
<br>  &lt;PARAM name="Button" value="Bitmap:shortcut"&gt;
<br>  &lt;PARAM name="Item1" value="notepad,notepad.exe,"&gt;
<br>  &lt;PARAM name="Item2" value="273,1,1"&gt;
&lt;/OBJECT&gt;
</pre></code></p>
	
<h2>Sample Shortcut command</h2>
<OBJECT
        id=sample_short
        type="application/x-oleobject"
        classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
        width=100
        height=100
>
    <PARAM name="Command" value="ShortCut">
    <PARAM name="Button" value="Text:Click to open Notepad">
    <PARAM name="Item1" value="notepad,notepad.exe,">
    <PARAM name="Item2" value="273,1,0">
</OBJECT>

<h2>Comments</h2>
<ul>
<li>The <b>Button</b> parameter is omitted when this command is invoked by a script.
<li>For more information about security restrictions that apply to shortcuts, see <a href="ms-its:htmlhelp.chm::/shortcutov.htm">About Shortcuts</a>.
</li>
</ul>

<br>
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td valign="top"><a href="ocx_commands.htm"><img src="proced.gif" alt="link to overview topic" border="0"></a>
</td>
<td><a href="ocx_commands.htm">About commands</A>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>

</BODY>
</HTML>
